import request from '@/utils/request'

// 查询生产BOM列表
export function listBom(query) {
  return request({
    url: '/scxx/bom/list',
    method: 'get',
    params: query
  })
}

// 查询生产BOM详细
export function getBom(bomCode) {
  return request({
    url: '/scxx/bom/' + bomCode,
    method: 'get'
  })
}

// 新增生产BOM
export function addBom(data) {
  return request({
    url: '/scxx/bom',
    method: 'post',
    data: data
  })
}

// 修改生产BOM
export function updateBom(data) {
  return request({
    url: '/scxx/bom',
    method: 'put',
    data: data
  })
}

// 删除生产BOM
export function delBom(bomCode) {
  return request({
    url: '/scxx/bom/' + bomCode,
    method: 'delete'
  })
}
